#coding=utf-8
num = 0
while num <= 50:
    if num%10==7 or num%7==0:
       num = num +1
    else:
        print(num)
        num=num+1